package com.muye.adapter;

import java.util.List;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.SparseArray;

/**
 * 首页导航适配器
 * 
 * @author TangChao
 *
 */
public class FragmentAdapter extends FragmentPagerAdapter
{
	
	private List<SparseArray<Fragment>> arrayList;
	
	public FragmentAdapter(FragmentManager fm)
	{
		super(fm);
	}
	
	public FragmentAdapter(FragmentManager fm, List<SparseArray<Fragment>> arrayList)
	{
		super(fm);
		this.arrayList = arrayList;
	}
	
	@Override
	public Fragment getItem(int arg0)
	{
		return arrayList.get(0).get(arg0);
	}
	
	@Override
	public int getCount()
	{
		return 4;
	}
	
}
